# Maintainer: BlackEagle <ike.devolder@gmail.com>>

pkgname=kodi-addon-screensaver-matrixtrails
epoch=1
pkgver=20.1.0
_codename=Nexus
pkgrel=6
pkgdesc="Matrix trails screensaver for Kodi"
arch=('loong64' 'x86_64')
url='https://github.com/xbmc/screensaver.matrixtrails'
license=('GPL')
groups=('kodi-addons' 'kodi-addons-screensaver')
makedepends=('cmake' 'kodi-dev')
options=(!lto)
source=("$pkgname-$pkgver.tar.gz::https://github.com/xbmc/screensaver.matrixtrails/archive/$pkgver-$_codename.tar.gz")
sha512sums=('9f209a7fa1c38f118deb051ccc8f2a783d0fedf4cfd23861e2f03a05f1da8db8ce2d01e5f6c181c31058af1738cd8cbc95190f8c878347dd0510c81ba94550e4')

build() {
    cd "screensaver.matrixtrails-$pkgver-$_codename"
    cmake \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=Release \
        -DBUILD_SHARED_LIBS=1 \
        -DUSE_LTO=1 \
        .
    make
}

package() {
    depends=('kodi')
    cd "screensaver.matrixtrails-$pkgver-$_codename"
    make DESTDIR="$pkgdir/" install
}

